package com.example.WebSocketDemo.mapper;

import com.example.WebSocketDemo.bean.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MessageMapper {
    void insertMessage(Message message);

    void insertUnReadMessage(Message message);

    void updateUnReadMessage(String username);

    List<Message> getMessageByFromUserAndToUserAndChatType(@Param("from") String from,@Param("to") String to,@Param("type") String type);

    Message getRecentMessage(String username,String friendName);

    List<Message> getUnAcceptedMessage(String username);
}
